import XLSX from 'xlsx';

export default () => {
    var json = [
        { A: '1', B: '2', C: '3', D: '4'},
        { A: 5, B: 6, C: 7, D: 8},
    ];


    var wb = XLSX.utils.book_new();
    var ws = XLSX.utils.json_to_sheet(json);
    XLSX.utils.book_append_sheet(wb, ws);

    XLSX.writeFile(wb, "JSON_EXPORT.xlsx", {compression:true});
}